A behavioral analysis on an information processing apparatus in many cases is performed for improvement in the performance of the information processing apparatus. Such improvement is achieved by finding a part of processing (hereinafter, a bottleneck) that leads to a cause to make the apparatus not operate at a desired performance level, and by removing or suppressing the cause that results in the bottleneck. Here, since the bottleneck can often be found attributable to processing for a certain part of a program, the principle purpose of the behavioral analysis can be used for finding the program part that forms the bottleneck.
An execution time is frequently used as a performance indicator indicating the behavior of the information processing apparatus. This is because the execution time is the performance indicator that most directly reflects the performance of a system. Thus, a number of measurement tools to measure execution times and a number of tools and techniques to analyze the performance have been devised. Patent Literature 1 discloses behavioral analysis performed by a server apparatus, where a measurement tool according to the event-driven scheme (more strictly, the event tracing scheme, which is one form thereof) is used. With reference to a schematic configuration diagram of a bottleneck detection system in FIG. 1, an analysis method disclosed in Patent Literature 1 is described. At the start, with respect to each part (program component) of a measurement target program, measurement functions (application probes), which output events to be traced, are inserted at positions corresponding to starts and ends of execution for each part of the program. Under this condition, the program is executed, time-series data (trace data) of events are sampled, and the trace data are analyzed and subjected to tabulation, so that the execution time is obtained for each part of the measurement target program.
There is a measurement tool employing a scheme to estimate an execution time for each part of the program in accordance with a sampling scheme that differs from the event-driven scheme. Examples of such a tool include OProfile (refer to Non-patent Literature 1), which is a tool that measures the behavior of a program by using a performance counter provided in a central processing unit (CPU). The measurement principle of OProfile is based on the result that, after kinds of hardware events in measurement target hardware and the number of occurrences of the events have been previously specified in the performance counter, an overflow interrupt (non-maskable interrupt (NMI)) occurs at the time when the number of occurrences of the specified kind of event reaches the specified number of occurrences. Specifically, an operation to record a current position of the program is performed every time when the overflow interrupt occurs, and this operation causes to generate a distribution of positions of the programs at which the overflow interrupts have occurred. In OProfile, the distribution obtained by performing such measurement for a long time period is treated as that of positions of the program at which the hardware event occurs, on the basis of a law of large numbers.
FIG. 2 illustrates one example of a measurement result obtained by OProfile. The result indicates “a time required for execution of each part of a program” obtained when a hardware event where a clock driving a CPU advances by one cycle, has been specified as an event to be measured. Each line of this diagram contains tabulated values for an individual part of the program. The respective columns contain, from the left, the number of event occurrences, the percentage thereof (with the number of occurrences of all events set to 100%), the name of a corresponding program, and the name of a corresponding function in the program.
Note that, in the case of x86 processors from Intel, although measurement target hardware and events to be measured that can be set in a performance counter in a CPU differ by kind of processor, the following events can be measured commonly among all kinds of processors: an execution time (an event where the clock advances by one cycle), the number of executed instructions (an event where a CPU completes execution of one instruction), and cache errors in the CPU.
Conventional techniques relating to methods for determining which part of a program forms a bottleneck include Patent Literature 1. Patent Literature 1 discloses a method for determining a part of a program to be a bottleneck, the part of the program showing a remarkable increase in execution time when execution times under a low load condition and execution times under a high load condition are compared for the respective parts of the program.